import request from '@/utils/request'
export default {
  // 1.获得自己申请的正在处理的查询列表
  getList (current, limit) {
    return request({
      url: `/apply/condition/list/${current}/${limit}`,
      method: 'get'
    })
  },
  // 2.获得自己申请的处理完成的查询列表
  getHistory (current, limit) {
    return request({
      url: `/apply/condition/history/${current}/${limit}`,
      method: 'get'
    })
  },
  // 3.获得待处理的申请列表
  getExamine (current, limit) {
    return request({
      url: `/apply/condition/examine/${current}/${limit}`,
      method: 'get'
    })
  },
  // 4.获得自己已经处理完成的申请列表
  getApprove (current, limit) {
    return request({
      url: `/apply/condition/approve/${current}/${limit}`,
      method: 'get'
    })
  },
  /**
   * 新建查询申请
   */
  apply (query) {
    return request({
      url: `/apply/condition`,
      method: 'post',
      data: query
    })
  },
  // 6.通过申请
  pass (id) {
    return request({
      url: `/apply/condition/pass/${id}`,
      method: 'post'
    })
  },
  // 7.拒绝申请
  deny (id) {
    return request({
      url: `/apply/condition/deny/${id}`,
      method: 'post'
    })
  },
  // 8.重新查询成功率
  refresh (id) {
    return request({
      url: `/apply/condition/refresh/${id}`,
      method: 'post'
    })
  },
  // 9.删除申请
  delete (ids) {
    return request({
      url: `/apply/condition`,
      method: 'delete',
      data: ids
    })
  },
}
